﻿using Abp.Dependency;
using DHJ.Cost.Timing;
using System.Collections.Generic;
using System.Threading.Tasks;
using DHJ.Cost.Excel;

namespace DHJ.Cost.CostBooking
{
    public class CostBookingManager : ICostBookingManager, ITransientDependency
    {
        private readonly ICostContext _costContext;

        public CostBookingManager(ICostContext costContext)
        {
            _costContext = costContext;
        }

        public async Task HandleExcelByExcelType(ExcelType type, OccurrenceTime time, List<ExcelCell> cells)
        {
            await Task.Run(() => ExcelHandler.HandleExcelCells(type, time, cells, _costContext));
        }
    }
}